<?php

class HBase {
	/**
	 * Uses a namespace.
	 * A namespace ending with an asterisk '*' refers to a directory, otherwise it represents a PHP file.
	 * If the namespace corresponds to a directory, the directory will be appended
	 * to the include path. If the namespace corresponds to a file, it will be included (include_once).
	 * @param string namespace to be used
	 * @param boolean whether to check the existence of the class after the class file is included
	 * @throws TInvalidDataValueException if the namespace is invalid
	 */
	public static function using($namespace,$checkClassExistence=true) {
		$a = array();
		$a = explode('.',$namespace);
		try {
			$str = SEPARATOR.str_replace('.',SEPARATOR,$namespace);
			// Include
			require_once(LIBRARY_PATH.$str.'.php');
		}
		catch (Exception  $ex) {
			throw new Exception("<h1>Wrong Namespace Syntax!</h1>".$ex->getMessage());
		}
	}
}

// Call System Classes
HBase::using('Data.HSql');
HBase::using('HCommon');
HBase::using('HUtil');
HBase::using('HApplication');
HBase::using('HLayout');

?>